﻿<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.helper.IConstant"
import="com.csd.helper.Tool"
import="com.csd.vo.UserVO"
import="com.csd.pojo.CostRecord"
pageEncoding="UTF-8"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HttpSession s = request.getSession();
UserVO uvo =  (UserVO)s.getAttribute(IConstant.userVO);

if(uvo==null)
{
	response.sendRedirect(path);
}

String stage = request.getParameter("stage");

/*费用记录列表*/
List<CostRecord> costList = (List<CostRecord>)request.getAttribute("costRecords");
Integer projectID = (Integer)request.getAttribute("projectID");

String returnpage = (String)request.getAttribute("returnpage");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>开支细节</title>
<link href="<%=path %>/student/css/student_right.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="main">
        <h1>当前项目的开支细节</h1>
        <hr />
        <h3>&nbsp;</h3>
        <table width="100%" >
            <tr>
                <td class="table_head" width="150px">时间</td>
                <td class="table_head">开支描述</td>
                <td class="table_head" width="150px">金额</td>
            </tr>
            
            <%
            	if(costList!=null && costList.size()>0)
            	{
            		for(CostRecord i : costList)
            		{
            %>
            <tr>
                <td><%=Tool.dateToString(i.getTime()) %></td>
                <td><%=i.getDetail() %></td>
                <td><%=i.getMoney() %></td>
            </tr>
            <%
            		}
            	}else{
            %>
            <tr>
                <td align="center" colspan="3">暂无记录</td>
            </tr>
            <%	}%>
        </table>
        <br />
        <!-- right here , put your action link to replace there link of jsp-->
        <a href="<%=path %>/projectInfoShow.action?projectID=<%=projectID %>&stage=<%=stage %>&returnpage=<%=returnpage %>">返回</a>
    </div>
</body>
</html>
